<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PID_Study: E:/STM32CubeIDEWorkspace/noRTOS/PID_Study/Drivers/Algorithm/Inc/kalman_filter.h 源文件</title>
<link rel="icon" href="Doxygen-55px.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Doxygen-55px.png"/></td>
  <td id="projectalign">
   <div id="projectname">PID_Study<span id="projectnumber">&#160;v1.0.0</span>
   </div>
   <div id="projectbrief">doc for PID_Study</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a href="dir_0c97d201d54b8b5817233953fc3aadb6.html">STM32CubeIDEWorkspace</a></li><li class="navelem"><a href="dir_f3310f12da31771255acec658cd4246d.html">noRTOS</a></li><li class="navelem"><a href="dir_8022218a35d1971722714ae72b00e870.html">PID_Study</a></li><li class="navelem"><a href="dir_17bc370c857333bc4166d76f67bb735c.html">Drivers</a></li><li class="navelem"><a href="dir_e69a281451c2b8e1f92d152816da16da.html">Algorithm</a></li><li class="navelem"><a href="dir_3bdb93e34c040a49dad5fa6bfdf8cbfd.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="headertitle"><div class="title">kalman_filter.h</div></div>
</div><!--header-->
<div class="contents">
<a href="kalman__filter_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#ifndef __KALMAN_FILTER_H_</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#define __KALMAN_FILTER_H_</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span> </div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &quot;main.h&quot;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span></div>
<div class="foldopen" id="foldopen00020" data-start="{" data-end="};">
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="struct_kalman___estimate.html">   20</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span>{</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="struct_kalman___estimate.html#adb0d4f54bba03069d82fe732abc4e0c5">   22</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman___estimate.html#adb0d4f54bba03069d82fe732abc4e0c5">last</a>;    </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="struct_kalman___estimate.html#af9653d31acfffa5a40aa709b2065e00b">   23</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman___estimate.html#af9653d31acfffa5a40aa709b2065e00b">current</a>; </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>} <a class="code hl_struct" href="struct_kalman___estimate.html">Kalman_Estimate</a>;</div>
</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span></div>
<div class="foldopen" id="foldopen00031" data-start="{" data-end="};">
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="struct_kalman___value.html">   31</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>{</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="struct_kalman___value.html#a6284e9f5334cf5daf646f8e707e3fd8e">   33</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman___value.html#a6284e9f5334cf5daf646f8e707e3fd8e">measure</a>;            </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="struct_kalman___value.html#a7f061fe54488b9d675331eeed4b42330">   34</a></span>    <a class="code hl_struct" href="struct_kalman___estimate.html">Kalman_Estimate</a> <a class="code hl_variable" href="struct_kalman___value.html#a7f061fe54488b9d675331eeed4b42330">estimate</a>; </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>} <a class="code hl_struct" href="struct_kalman___value.html">Kalman_Value</a>;</div>
</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno">   36</span></div>
<div class="foldopen" id="foldopen00042" data-start="{" data-end="};">
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="struct_kalman___error.html">   42</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>{</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="struct_kalman___error.html#a6284e9f5334cf5daf646f8e707e3fd8e">   44</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman___error.html#a6284e9f5334cf5daf646f8e707e3fd8e">measure</a>;  </div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="struct_kalman___error.html#ad3e2314866c884f10c8958cc80c536e7">   45</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman___error.html#ad3e2314866c884f10c8958cc80c536e7">estimate</a>; </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span>} <a class="code hl_struct" href="struct_kalman___error.html">Kalman_Error</a>;</div>
</div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span></div>
<div class="foldopen" id="foldopen00053" data-start="{" data-end="};">
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"><a class="line" href="struct_kalman.html">   53</a></span><span class="keyword">typedef</span> <span class="keyword">struct</span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>{</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="struct_kalman.html#a46d651091cfbc3c0717bd49740d3326b">   55</a></span>    <a class="code hl_struct" href="struct_kalman___value.html">Kalman_Value</a> <a class="code hl_variable" href="struct_kalman.html#a46d651091cfbc3c0717bd49740d3326b">value</a>;       </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="struct_kalman.html#ae461ad92cf44f29b4aede6daeb03c9b4">   56</a></span>    <a class="code hl_struct" href="struct_kalman___error.html">Kalman_Error</a> <a class="code hl_variable" href="struct_kalman.html#ae461ad92cf44f29b4aede6daeb03c9b4">error</a>;       </div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="struct_kalman.html#a2b39a09b14dbb347c40612035a7b6f2c">   57</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman.html#a2b39a09b14dbb347c40612035a7b6f2c">Gain</a>;               </div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="struct_kalman.html#a0000d20385113846bce88982087e44b9">   58</a></span>    <span class="keywordtype">float</span> <a class="code hl_variable" href="struct_kalman.html#a0000d20385113846bce88982087e44b9">error_estimate_buf</a>; </div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span>} <a class="code hl_struct" href="struct_kalman.html">Kalman</a>;</div>
</div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="keywordtype">void</span> <a class="code hl_function" href="kalman__filter_8h.html#aff9cf5d84aa5362c33ff4941522fee35">Kalman_Error_Set</a>(<a class="code hl_struct" href="struct_kalman.html">Kalman</a> *kalman, <span class="keywordtype">float</span> error_estimate, <span class="keywordtype">float</span> error_measure);</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span><span class="keywordtype">void</span> <a class="code hl_function" href="kalman__filter_8h.html#a3cb3c8cf683614e67bfdef41496009a4">Kalman_calculate</a>(<a class="code hl_struct" href="struct_kalman.html">Kalman</a> *kalman, <span class="keywordtype">float</span> value_measure);</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span><span class="keywordtype">float</span> <a class="code hl_function" href="kalman__filter_8h.html#ab9c55009ab86793c67945c58d5389384">Kalman_Value_Estimate_Get</a>(<a class="code hl_struct" href="struct_kalman.html">Kalman</a> kalman);</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="keywordtype">void</span> <a class="code hl_function" href="kalman__filter_8h.html#a6adbfe36db2a055bc1f7e4c1150cd4d4">Kalman_Init</a>(<a class="code hl_struct" href="struct_kalman.html">Kalman</a> *kalman, <span class="keywordtype">float</span> initial_estimate, <span class="keywordtype">float</span> error_estimate, <span class="keywordtype">float</span> error_measure);</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span><span class="preprocessor">#endif </span><span class="comment">/* __KALMAN_FILTER_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="akalman__filter_8h_html_a3cb3c8cf683614e67bfdef41496009a4"><div class="ttname"><a href="kalman__filter_8h.html#a3cb3c8cf683614e67bfdef41496009a4">Kalman_calculate</a></div><div class="ttdeci">void Kalman_calculate(Kalman *kalman, float value_measure)</div><div class="ttdoc">执行卡尔曼滤波计算</div><div class="ttdef"><b>定义</b> kalman_filter.c:101</div></div>
<div class="ttc" id="akalman__filter_8h_html_a6adbfe36db2a055bc1f7e4c1150cd4d4"><div class="ttname"><a href="kalman__filter_8h.html#a6adbfe36db2a055bc1f7e4c1150cd4d4">Kalman_Init</a></div><div class="ttdeci">void Kalman_Init(Kalman *kalman, float initial_estimate, float error_estimate, float error_measure)</div><div class="ttdoc">初始化卡尔曼滤波器</div><div class="ttdef"><b>定义</b> kalman_filter.c:20</div></div>
<div class="ttc" id="akalman__filter_8h_html_ab9c55009ab86793c67945c58d5389384"><div class="ttname"><a href="kalman__filter_8h.html#ab9c55009ab86793c67945c58d5389384">Kalman_Value_Estimate_Get</a></div><div class="ttdeci">float Kalman_Value_Estimate_Get(Kalman kalman)</div><div class="ttdoc">获取卡尔曼滤波器的当前估计值</div><div class="ttdef"><b>定义</b> kalman_filter.c:119</div></div>
<div class="ttc" id="akalman__filter_8h_html_aff9cf5d84aa5362c33ff4941522fee35"><div class="ttname"><a href="kalman__filter_8h.html#aff9cf5d84aa5362c33ff4941522fee35">Kalman_Error_Set</a></div><div class="ttdeci">void Kalman_Error_Set(Kalman *kalman, float error_estimate, float error_measure)</div><div class="ttdoc">设置卡尔曼滤波器的误差参数</div><div class="ttdef"><b>定义</b> kalman_filter.c:38</div></div>
<div class="ttc" id="astruct_kalman___error_html"><div class="ttname"><a href="struct_kalman___error.html">Kalman_Error</a></div><div class="ttdoc">卡尔曼滤波器误差结构体</div><div class="ttdef"><b>定义</b> kalman_filter.h:43</div></div>
<div class="ttc" id="astruct_kalman___error_html_a6284e9f5334cf5daf646f8e707e3fd8e"><div class="ttname"><a href="struct_kalman___error.html#a6284e9f5334cf5daf646f8e707e3fd8e">Kalman_Error::measure</a></div><div class="ttdeci">float measure</div><div class="ttdef"><b>定义</b> kalman_filter.h:44</div></div>
<div class="ttc" id="astruct_kalman___error_html_ad3e2314866c884f10c8958cc80c536e7"><div class="ttname"><a href="struct_kalman___error.html#ad3e2314866c884f10c8958cc80c536e7">Kalman_Error::estimate</a></div><div class="ttdeci">float estimate</div><div class="ttdef"><b>定义</b> kalman_filter.h:45</div></div>
<div class="ttc" id="astruct_kalman___estimate_html"><div class="ttname"><a href="struct_kalman___estimate.html">Kalman_Estimate</a></div><div class="ttdoc">卡尔曼滤波器估计值结构体</div><div class="ttdef"><b>定义</b> kalman_filter.h:21</div></div>
<div class="ttc" id="astruct_kalman___estimate_html_adb0d4f54bba03069d82fe732abc4e0c5"><div class="ttname"><a href="struct_kalman___estimate.html#adb0d4f54bba03069d82fe732abc4e0c5">Kalman_Estimate::last</a></div><div class="ttdeci">float last</div><div class="ttdef"><b>定义</b> kalman_filter.h:22</div></div>
<div class="ttc" id="astruct_kalman___estimate_html_af9653d31acfffa5a40aa709b2065e00b"><div class="ttname"><a href="struct_kalman___estimate.html#af9653d31acfffa5a40aa709b2065e00b">Kalman_Estimate::current</a></div><div class="ttdeci">float current</div><div class="ttdef"><b>定义</b> kalman_filter.h:23</div></div>
<div class="ttc" id="astruct_kalman___value_html"><div class="ttname"><a href="struct_kalman___value.html">Kalman_Value</a></div><div class="ttdoc">卡尔曼滤波器数值结构体</div><div class="ttdef"><b>定义</b> kalman_filter.h:32</div></div>
<div class="ttc" id="astruct_kalman___value_html_a6284e9f5334cf5daf646f8e707e3fd8e"><div class="ttname"><a href="struct_kalman___value.html#a6284e9f5334cf5daf646f8e707e3fd8e">Kalman_Value::measure</a></div><div class="ttdeci">float measure</div><div class="ttdef"><b>定义</b> kalman_filter.h:33</div></div>
<div class="ttc" id="astruct_kalman___value_html_a7f061fe54488b9d675331eeed4b42330"><div class="ttname"><a href="struct_kalman___value.html#a7f061fe54488b9d675331eeed4b42330">Kalman_Value::estimate</a></div><div class="ttdeci">Kalman_Estimate estimate</div><div class="ttdef"><b>定义</b> kalman_filter.h:34</div></div>
<div class="ttc" id="astruct_kalman_html"><div class="ttname"><a href="struct_kalman.html">Kalman</a></div><div class="ttdoc">卡尔曼滤波器主结构体</div><div class="ttdef"><b>定义</b> kalman_filter.h:54</div></div>
<div class="ttc" id="astruct_kalman_html_a0000d20385113846bce88982087e44b9"><div class="ttname"><a href="struct_kalman.html#a0000d20385113846bce88982087e44b9">Kalman::error_estimate_buf</a></div><div class="ttdeci">float error_estimate_buf</div><div class="ttdef"><b>定义</b> kalman_filter.h:58</div></div>
<div class="ttc" id="astruct_kalman_html_a2b39a09b14dbb347c40612035a7b6f2c"><div class="ttname"><a href="struct_kalman.html#a2b39a09b14dbb347c40612035a7b6f2c">Kalman::Gain</a></div><div class="ttdeci">float Gain</div><div class="ttdef"><b>定义</b> kalman_filter.h:57</div></div>
<div class="ttc" id="astruct_kalman_html_a46d651091cfbc3c0717bd49740d3326b"><div class="ttname"><a href="struct_kalman.html#a46d651091cfbc3c0717bd49740d3326b">Kalman::value</a></div><div class="ttdeci">Kalman_Value value</div><div class="ttdef"><b>定义</b> kalman_filter.h:55</div></div>
<div class="ttc" id="astruct_kalman_html_ae461ad92cf44f29b4aede6daeb03c9b4"><div class="ttname"><a href="struct_kalman.html#ae461ad92cf44f29b4aede6daeb03c9b4">Kalman::error</a></div><div class="ttdeci">Kalman_Error error</div><div class="ttdef"><b>定义</b> kalman_filter.h:56</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
